package com.rk.pethome.org.controller;


import com.rk.pethome.org.domain.Employee;
import com.rk.pethome.org.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/employee")
public class EmployeeController {
    @Autowired
    private IEmployeeService employeeService;

    /**
     * 查询所有的员工
     * @return
     */
    @PostMapping("/loadAll")
    public List<Employee> loadAll(){
        return employeeService.loadAll();
    }


}
